(Info-follow-reference): Fix completion defaulting.
authorRichard M. Stallman <rms@gnu.org>
Tue, 8 Jun 1993 04:41:00 +0000 (04:41 +0000)
committerRichard M. Stallman <rms@gnu.org>
Tue, 8 Jun 1993 04:41:00 +0000 (04:41 +0000)
lisp/info.el

index 043a4402ce019c91e7e67d362df4022dbf2491c2..1aec6acc629f6e34e76ddcd314a44d6e67023424 100644 (file)
@@ -661,11 +661,13 @@ NAME may be an abbreviation of the reference name."
               (cons (cons str nil)
                     completions))))
      (if completions
-        (list (completing-read (if default
-                                   (concat "Follow reference named: ("
-                                           default ") ")
-                                 "Follow reference named: ")
-                               completions default t))
+        (let ((input (completing-read (if default
+                                          (concat "Follow reference named: ("
+                                                  default ") ")
+                                        "Follow reference named: ")
+                                      completions nil t)))
+          (list (if (equal input "")
+                    default input)))
        (error "No cross-references in this node"))))
   (let (target beg i (str (concat "\\*note " footnotename)))
     (while (setq i (string-match " " str i))